]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
perf-tool: Add --headless
authorJonas Ådahl <jadahl@gmail.com>
Tue, 16 Mar 2021 09:30:20 +0000 (10:30 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 25 Nov 2022 21:09:37 +0000 (22:09 +0100)
This will use the headless mode of the native backend, and create a
1280x720 virtual monitor, for running the perf test in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>

src/gnome-shell-perf-tool.in

index f1df14b99fd5488303a6ac50fb45a27466c3fdc2..ae8a84d9fcca7fcfe0c556bfbe409785a1f2496d 100755 (executable)
@@ -45,12 +45,18 @@ def start_shell(perf_output=None):
     if options.replace:
         args.append('--replace')
 
-    if options.wayland or options.nested:
+    if options.wayland or options.nested or options.headless:
         args.append('--wayland')
         if options.nested:
             args.append('--nested')
+        elif options.headless:
+            args.append('--headless')
+            args.append('--virtual-monitor')
+            args.append('1280x720')
         else:
             args.append('--display-server')
+        args.append('--wayland-display')
+        args.append('gnome-shell-test-display')
     elif options.x11:
         args.append('--x11')
 
@@ -299,6 +305,8 @@ parser.add_option("-n", "--nested", action="store_true",
                   help="Run as a Wayland nested compositor")
 parser.add_option("-x", "--x11", action="store_true",
                   help="Run as an X11 compositor")
+parser.add_option("", "--headless", action="store_true",
+                  help="Run as a headless Wayland compositor")
 
 options, args = parser.parse_args()